]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NetworkMenu: fixup device descriptions
authorGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 29 Mar 2011 12:29:26 +0000 (14:29 +0200)
committerDan Winship <danw@gnome.org>
Mon, 11 Apr 2011 14:38:00 +0000 (10:38 -0400)
Fix some bugs in Util.fixupPCIDescription(), that caused all device
descriptions to be empty.

https://bugzilla.gnome.org/show_bug.cgi?id=646074

js/misc/util.js

index e2281171616db462a04be96c5ec47223d125ff7f..2d9cef26471074ab22fe780a380077cc87ce27ad 100644 (file)
@@ -150,7 +150,7 @@ const _IGNORED_WORDS = [
         'Incorporated',
         'Ltd.',
         'Limited.',
-        'Intel?',
+        'Intel',
         'chipset',
         'adapter',
         '[hex]',
@@ -181,7 +181,7 @@ const _IGNORED_PHRASES = [
 ];
 
 function fixupPCIDescription(desc) {
-    desc.replace(/[_,]/, ' ');
+    desc = desc.replace(/[_,]/, ' ');
 
     /* Attempt to shorten ID by ignoring certain phrases */
     for (let i = 0; i < _IGNORED_PHRASES.length; i++) {
@@ -197,7 +197,7 @@ function fixupPCIDescription(desc) {
     /* Attmept to shorten ID by ignoring certain individual words */
     let words = desc.split(' ');
     let out = [ ];
-    for (let i = 0; i < words; i++) {
+    for (let i = 0; i < words.length; i++) {
         let item = words[i];
 
         // skip empty items (that come out from consecutive spaces)